const  dbUtil = {
	key:{
		SELECT_USER_LIST:'SELECT_USER_LIST',
		SELECT_USER_VIEW:'SELECT_USER_VIEW',
		SELECT_PROJECT_LIST:'SELECT_PROJECT_LIST',
		SELECT_PROJECT_VIEW:'SELECT_PROJECT_VIEW',
		REFRUE_ORDER_VIEW:'REFRUE_ORDER_VIEW',
	},
	set: function (key, value) {
		if( !(value instanceof Object) )  {
			value = {dbStringDataZb:value};
		}
		value=JSON.stringify(value);
		return localStorage.setItem(key,value);
	},
	get: function (key) {
		var data = JSON.parse( localStorage.getItem(key) );
		if(!data)
			return null;
		if(data.dbStringDataZb)
			 return data.dbStringDataZb;
		return data;
	},
	setVal: function (key, value) {
		return localStorage.setItem(key,value);
	},
	getVal: function (key) {
		return localStorage.getItem(key);
	},
	delete: function (key) {
		return localStorage.removeItem(key);
	}
	
}
export default dbUtil;